package wechat.bean.response.message.reply;

import org.dom4j.DocumentException;
import org.dom4j.Element;

import wechat.bean.response.MessageBaseBean;

/**
 * 视频消息
 * 
 *
 */
public class ReplyVideoBean extends MessageBaseBean {
	private String Title;
	private String Description;
	private String MediaId;
	
	public ReplyVideoBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Reply_Message_Video);
	}
	
	public ReplyVideoBean(){
		super.setMsgType(Reply_Message_Video);
	}

	
	public String getTitle() {
		return Title;
	}

	public void setTitle(String title) {
		Title = title;
	}

	public String getDescription() {
		return Description;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public String getMediaId() {
		return MediaId;
	}

	public void setMediaId(String mediaId) {
		MediaId = mediaId;
	}

	
//	protected static final String Xpath_ThumbMediaId = "/xml/ThumbMediaId";
//	protected static final String Xpath_MediaId = "/xml/MediaId";
//	
//	public void transform() throws Exception {
//		super.transform();
//		this.setThumbMediaId(getNodeText(Xpath_ThumbMediaId));
//		this.setMediaId(getNodeText(Xpath_MediaId));
//	}


	
	
	public String buildXml() throws Exception {
		super.buildXml();
		Element Video = super.addNode("Video");
		Video.addElement("MediaId").addCDATA(getMediaId());
		Video.addElement("Title").addCDATA(getTitle());
		Video.addElement("Description").addCDATA(getDescription());
		return parent.asXML();
	}






}
